/* HMAC-MD5: Keyed-Hashing for Message Authentication
 * This program implements RFC2104(February 1997).
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2, or (at your option) any
 * later version.
 */


#ifndef __HMAC_MD5__
#define __HMAC_MD5__

#include <stdint.h>
#include "md5.h"

#define HMAC_MD5_SIZE 16

struct HmacMd5Context
{
	uint8_t key[64];	// 64-byte key
	struct MD5Context hash;
};

void HmacMd5Init(struct HmacMd5Context *ctx, const void *key, unsigned int len);
void HmacMd5Update(struct HmacMd5Context *ctx, const void *data, unsigned int len);
void HmacMd5Final(unsigned char digest[16], struct HmacMd5Context *ctx);
void HmacMd5HexString(char hex[33], const unsigned char digest[16]);

#endif
